<?php
/**
 * 缓存抽象和接口
 * 
 * @package SFramework
 * @subpackage Cache
 * @author Shuky
 * @since v1.0
 * @version $Id: CacheAbstract.php 97 2011-01-22 16:59:07Z shukyoo@gmail.com $
 */
namespace SF\Cache;

/**
 * 缓存接口
 */
interface CacheInterface
{
	public function get($key);
	public function set($key, $value, $expire = null);
	public function del($key);
}


/**
 * 缓存抽象
 */
class CacheAbstract
{
	protected $_options = array();

	public function __construct(array $options = array())
	{
        while (list($key, $value) = each($options)) {
            $this->setOption($key, $value);
        }
	}


	public function setOption($key, $value)
	{
		$this->_options[$key] = $value;
	}
}



